#include<iostream>
#include<unistd.h>
#include<cerrno>
#include<cstring>


int main()
{
    //1.创建管道
    int pipefd[2];
    int n=pipe(pipefd);

    if(n!=0)
    {
        std::cerr<<"errno:"<<errno<<":"<<"errstring :"<<strerror(errno)<<std::endl;
        return 1;
    }

    std::cout<<"pipefd[0]:"<<pipefd[0]<<",pipefd[1]:"<<pipefd[1]<<std::endl;
    std::cout<<"hello pipe"<<std::endl;

    return 0;
}